# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: François Charette <firmicus ατ gmx δοτ net>

pkgname=perl-http-server-simple
pkgver=0.52
pkgrel=5
pkgdesc="Lightweight HTTP server"
arch=(any)
url="https://search.cpan.org/dist/HTTP-Server-Simple"
license=('GPL' 'PerlArtistic')
depends=('perl-uri' 'perl-cgi')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/B/BP/BPS/HTTP-Server-Simple-$pkgver.tar.gz)
sha256sums=('d8939fa4f12bd6b8c043537fd0bf96b055ac3686b9cdd9fa773dca6ae679cb4c')

build() {
  cd  "$srcdir"/HTTP-Server-Simple-$pkgver
  PERL_USE_UNSAFE_INC=1 \
  PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
  make
}

package() {
  cd  "$srcdir"/HTTP-Server-Simple-$pkgver
  make install DESTDIR="$pkgdir"
  find "$pkgdir" -name '.packlist' -delete
  find "$pkgdir" -name '*.pod' -delete
}
